<?php

namespace app\models\dao;

use Yii;

/**
 * This is the model class for table "{{%role_nav}}".
 *
 * @property integer $id
 * @property string $name
 * @property integer $type
 * @property string $url
 * @property string $icon
 * @property string $icon_bg
 * @property integer $status
 * @property integer $flag
 * @property integer $sort
 */
class RoleNav extends \app\common\PopToolActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%role_nav}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name', 'url'], 'required'],
            [['type', 'status', 'flag', 'sort'], 'integer'],
            [['name', 'icon_bg'], 'string', 'max' => 50],
            [['url'], 'string', 'max' => 1000],
            [['icon'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '菜单id',
            'name' => '菜单名称',
            'type' => '账号类型：0、系统管理员，1、酒店管理员',
            'url' => '菜单URL',
            'icon' => '图标',
            'icon_bg' => '图标颜色',
            'status' => '菜单启用及停用：1.启用，0.停用',
            'flag' => '数据状态：0、作废，1、正常',
            'sort' => '排序',
        ];
    }
}
